angular.module('app').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
  $stateProvider.state('main', {
    url: '/main',
    templateUrl: 'view/main.html',
    controller: 'main'
  }).state('detail', {
    url: '/detail:id',
    templateUrl: 'view/position.html',
    controller: 'detail'
  }).state('company', {
    url: '/company/:id',
    templateUrl: 'view/company.html',
    controller: 'company'
  }).state('search', {
    url: '/search',
    templateUrl: 'view/search.html',
    controller: 'search'
  }).state('login', {
    url: '/login',
    templateUrl: 'view/login.html',
    controller: 'login'
  }).state('register', {
    url: '/register',
    templateUrl: 'view/register.html',
    controller: 'register'
  }).state('me', {
    url: '/me',
    templateUrl: 'view/me.html',
    controller: 'me'
  }).state('post', {
    url: '/post',
    templateUrl: 'view/post.html',
    controller: 'post'
  }).state('favorite', {
    url: '/favorite',
    templateUrl: 'view/favorite.html',
    controller: 'favorite'
  });
  $urlRouterProvider.otherwise('main');
}])
